package com.yidu.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yidu.common.Tools;
import com.yidu.dao.ListenStockRecordMapper;
import com.yidu.domain.ListenStockRecord;
import com.yidu.service.ListenStockRecordService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiangyu
 * @since 2018-11-27
 */
@Service
public class ListenStockRecordServiceImpl  implements ListenStockRecordService {
	@Resource
	private ListenStockRecordMapper dao;
	
	/**
	 * 查询全部
	 */
	@Override
	public List<ListenStockRecord> selectAll(Map<String, Object> map) {
		List<ListenStockRecord>  list=dao.selectAll(map);
		for (ListenStockRecord listenStockRecord : list) {
			String  tc=Tools.getTimeStr(listenStockRecord.getSrTime());
			listenStockRecord.setSrcTime(tc);
		}
		return list;
	}
	/**
	 * 查询总行数
	 */
	@Override
	public int selectC(Map<String, Object> map) {
		return dao.selectC(map);
	}
	@Override
	public int insertRecord(ListenStockRecord record) {
		// TODO Auto-generated method stub
		return 0;
	}
	/**
	 * 增加明细的方法 【有责增加无则不增加】
	 */
	@Override
	public int insertSelective(ListenStockRecord stockrecord) {
		// 增加明细的方法 【有责增加无则不增加】
		return dao.insertSelective(stockrecord);
	}

}
